const TransformPages = require('uni-read-pages')
const {webpack} = new TransformPages()
module.exports = {
	configureWebpack: {
		plugins: [
			new webpack.DefinePlugin({
				ROUTES: webpack.DefinePlugin.runtimeValue(() => {
					const tfPages = new TransformPages({
						includes: ['path', 'name', 'meta','aliasPath']
					});
					return JSON.stringify(tfPages.routes)
				}, true )
			})
		]
	},
	devServer:{
	    open:false, //打开浏览器，
	    //port:8080,  //配置端口，如果冲突，正常情况下会自动+1
	    proxy: {
	        '/': {
	          target: 'https://api.php800.cn/weilai/api/ ',
	          ws: false,
	          changeOrigin: true,  
	        },
	       
	      }
	}
}